﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using YXQ.Common.Helper;
using YXQ.Dao;
using YXQ.Dao.ViewModel;
using YXQ.Service;

namespace YXQ.Manager.Manager
{
    public partial class ItemDetail : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            int ou=0;
            List<ItemModel> items = CenterService.itemService.GetList(Convert.ToInt32( Request["Id"]));
            replist.DataSource = items;
            replist.DataBind();
        }

        protected void btnSave_Click(object sender, EventArgs e)
        {
            ItemModel item = new ItemModel();
            item.ProjectTitle = txtTitle.Text;
            if (CenterService.itemService.Save(item) > 0) {
                txtTitle.Text = "";
                
                JsHelper.AlertAndRedirect(this,"数据保存成功","ItemDetail.aspx");
            }
        }
    }
}